home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / September 96 / Re Bounds of s PolygonShape,.2 < prev    next >
Encoding:
Internet Message Format  |  1996-09-19  |  1.8 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Bounds of s PolygonShape, bug
  2. Sent:        9/16/96 10:39 PM
  3. Received:    9/16/96 10:39 PM
  4. From:        motion@nbn.com (Arni McKinley)
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List
  7.  
  8.  
  9. Brad and others,
  10.  
  11. Haven't had a response to this. It is a real problem and I wonder if the
  12. ODF team or OD team can look into it.
  13.  
  14. Arni
  15.  
  16. >>The bounds is too small compared to what, the bounds of the points, or
  17. >>the bounds of what gets rendered if you frame it? The ODShape does not
  18. >>take into account any pen width (which would hang down, and to the right).
  19. >
  20. >When the bounds is drawn around the shape the right edge and the bottom
  21. >edge of the shape stick out beyond the bounds frame. I can send a screen
  22. >shot if you want.
  23. >
  24. >Arni
  25. >
  26. >>
  27. >>>I have noticed that if I create an ODShape based on the region of an
  28. >>>arbitrary polygon, then later ask for the shape's bounds, the bounds will
  29. >>>be too small on the right side and the bottom side, each by one pixel.
  30. >>>
  31. >>>ODShape* polyShape = ::FW_NewODShape( ev );
  32. >>>::FW_SetShapeRegion( ev, polyShape, ::FW_CreatePolygonRegion(
  33. >>>fPoly.GetCount(), fPoly.GetPoints() ) );
  34. >>>
  35. >>>selectionBounds = FW_GetShapeBoundingBox(ev, polyShape);
  36. >>>
  37. >>>selectionBounds will be too small.
  38. >>>
  39. >>>The code above begins in FW_CDragCommand::BeginDrag() where the selection
  40. >>>is asked to create the drag shape. Immediately afterward the bnds is
  41. >>>requested and used. A complex polygon will appear closed when dragged and
  42. >>>will leave a trail because the bounds is too small.
  43. >
  44. >Arni F. McKinley
  45. >President
  46. >MetaMind Software, Inc.
  47. >Mill Valley, CA 94941
  48. >motion@nbn.com
  49. >www.nbn.com/people/minds
  50. >_______________________________________
  51.  
  52. Arni F. McKinley
  53. President
  54. MetaMind Software, Inc.
  55. Mill Valley, CA 94941
  56. motion@nbn.com
  57. www.nbn.com/people/minds
  58. _______________________________________